package com.dindang.checkline.mvp.greendao.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.dindang.checkline.mvp.greendao.entity.CheckItem;
import com.dindang.checkline.mvp.greendao.entity.CheckPiont;
import com.dindang.checkline.mvp.model.entity.ItemDetailEntity;

import com.dindang.checkline.mvp.greendao.gen.CheckItemDao;
import com.dindang.checkline.mvp.greendao.gen.CheckPiontDao;
import com.dindang.checkline.mvp.greendao.gen.ItemDetailEntityDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig checkItemDaoConfig;
    private final DaoConfig checkPiontDaoConfig;
    private final DaoConfig itemDetailEntityDaoConfig;

    private final CheckItemDao checkItemDao;
    private final CheckPiontDao checkPiontDao;
    private final ItemDetailEntityDao itemDetailEntityDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        checkItemDaoConfig = daoConfigMap.get(CheckItemDao.class).clone();
        checkItemDaoConfig.initIdentityScope(type);

        checkPiontDaoConfig = daoConfigMap.get(CheckPiontDao.class).clone();
        checkPiontDaoConfig.initIdentityScope(type);

        itemDetailEntityDaoConfig = daoConfigMap.get(ItemDetailEntityDao.class).clone();
        itemDetailEntityDaoConfig.initIdentityScope(type);

        checkItemDao = new CheckItemDao(checkItemDaoConfig, this);
        checkPiontDao = new CheckPiontDao(checkPiontDaoConfig, this);
        itemDetailEntityDao = new ItemDetailEntityDao(itemDetailEntityDaoConfig, this);

        registerDao(CheckItem.class, checkItemDao);
        registerDao(CheckPiont.class, checkPiontDao);
        registerDao(ItemDetailEntity.class, itemDetailEntityDao);
    }
    
    public void clear() {
        checkItemDaoConfig.clearIdentityScope();
        checkPiontDaoConfig.clearIdentityScope();
        itemDetailEntityDaoConfig.clearIdentityScope();
    }

    public CheckItemDao getCheckItemDao() {
        return checkItemDao;
    }

    public CheckPiontDao getCheckPiontDao() {
        return checkPiontDao;
    }

    public ItemDetailEntityDao getItemDetailEntityDao() {
        return itemDetailEntityDao;
    }

}
